package com.hello.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import com.hello.business.businessimp.UserService;
import java.util.List;
import com.hello.entity.User;

@Controller
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/loadAll")
    public String loadAllHandler(Model model) {
        List<User> userList=userService.loadUser();
        model.addAttribute("userList", userList);

        return "index";
    }
}

